<%@ page pageEncoding="UTF-8"%>
<%@ include file="/common/token.jsp"%>
<%
    Integer id = input.getInt("ask_id", -1);
    List list = QBuilder.db("basedb").select().from("friend").where(new Where("dest_uid = ",token.getUid()).and("status = ", STATUS_ENABLE).and("id=", id).and("state = 0")).query().getResultObj();
    if (isEmpty(list)) {
        msg = new Message(30041, "该请求已经处理");
        Tools.encryptPrint(out, msg);
        return;
    }
    Map map = (Map)list.get(0);
    map.put("state", 1);
    map.put("id", id);
    DBTools.db("basedb").modItem("friend", map);
    Tools.encryptPrint(out, msg);
%>
